package contegor.scire.core;

import java.util.List;



/**
 * Interface for the {@link Task}s that depend on others.
 *
 * @version $Revision: 1.2 $
 * @author  Héctor Cirbián Pousa ($Author: hector $)
 */
@Version("$Id: WithDependencies.java,v 1.2 2010-02-01 10:55:40 hector Exp $")
public interface WithDependencies<I,O> extends Task<O> {

  /**
   * Returns a {@link List} with {@link Task}s on which this one depends.
   * Implementation notes:
   * If {@link Task}s with the same target are set consecutively, then they could be processed more effectively.
   */
  public List<? extends Task<I>> getDependencies();

  /**
   * Returns a {@link List} with this {@link Task} dependencies {@link ReturnPoint}s. It must have the same number
   * of elements and this must be in sync with those in the {@link List} returned by {@link #getDependencies()},
   * so first {@link ReturnPoint} will correspond to first consequence {@link Task}, second to second, and so on.
   */
  public List<? extends ReturnPoint<? super I>> getDependenciesReturnPoints();
}
